
func int b_teachdemonologtalent(var C_Npc slf,var C_Npc oth,var int talent)
{
	var int kosten;
	var int money;
	kosten = B_GetLearnCostTalent(oth,talent,1);
	money = kosten * 125;
	if(talent != NPC_TALENT_DEMONOLOG)
	{
		Print("*** ERROR: Wrong Parameter ***");
		return FALSE;
	};
	if(oth.lp < kosten)
	{
		PrintScreen(PRINT_NotEnoughLearnPoints,-1,-1,FONT_ScreenSmall,2);
		B_Say(slf,oth,"$NOLEARNNOPOINTS");
		return FALSE;
	};
	if(Npc_HasItems(oth,ItMi_Gold) < money)
	{
		PrintScreen(Print_NotEnoughGold,-1,-1,FONT_Screen,2);
		B_Say(slf,oth,"$ShitNoGold");
		return FALSE;
	};
	oth.lp = oth.lp - kosten;
	Npc_RemoveInvItems(oth,ItMi_Gold,money);
	if(talent == NPC_TALENT_DEMONOLOG)
	{
		if((XARDASTEACHCASTDEMON_SIMPLE == FALSE) && (XARDASTEACHCASTDEMON_LORD == FALSE))
		{
			Npc_SetTalentSkill(oth,NPC_TALENT_DEMONOLOG,1);
			XARDASTEACHCASTDEMON = TRUE;
			PrintScreen(PRINT_LEARNDEMONOLOGSIMPLE,-1,-1,FONT_Screen,2);
			Snd_Play("LevelUP");
			return TRUE;
		}
		else if((XARDASTEACHCASTDEMON_SIMPLE == TRUE) && (XARDASTEACHCASTDEMON_LORD == FALSE))
		{
			Npc_SetTalentSkill(oth,NPC_TALENT_DEMONOLOG,1);
			XARDASTEACHCASTDEMON = TRUE;
			PrintScreen(PRINT_LEARNDEMONOLOGLORD,-1,-1,FONT_Screen,2);
			Snd_Play("LevelUP");
			return TRUE;
		};
	};
	return FALSE;
};

